#include <iostream>
#include <typeinfo>

using namespace std;

template <typename T>
class A {
public:
	A(T val):a(val){}
	template <typename T1>
	A(){ cout<<typeid(T1).name()<<endl; }
	void show() const { std::cout<< a <<endl; }
private:
	T a;
};

template <typename T>
class B : public A<T> {
public:
	B(T val):A<T>(val) {}
	template <typename T1>
		void show1() { cout<<__func__<<" "<<typeid(T1).name()<<endl; }

};

template <typename T>
static inline void show(T a) { cout<<a<<endl; }

template <typename T>
void test(T a) { cout<<a<<endl; }

int main(int argc, char const* argv[])
{
	A<std::string> a("hello");
	B<int> b(10);
	a.show();
	b.show();
	b.show1<int>();

    show(1);
    show("a");
	return 0;
}
